+2001-10-08 Havoc Pennington <hp@pobox.com>
+
+ * demos/gtk-demo/stock_browser.c: remove unused enum
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+ pass the current selection state of the node in to the user
+ selection func
+
2001-10-06 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to
+2001-10-08 Havoc Pennington <hp@pobox.com>
+
+ * demos/gtk-demo/stock_browser.c: remove unused enum
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+ pass the current selection state of the node in to the user
+ selection func
+
2001-10-06 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to
+2001-10-08 Havoc Pennington <hp@pobox.com>
+
+ * demos/gtk-demo/stock_browser.c: remove unused enum
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+ pass the current selection state of the node in to the user
+ selection func
+
2001-10-06 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to
+2001-10-08 Havoc Pennington <hp@pobox.com>
+
+ * demos/gtk-demo/stock_browser.c: remove unused enum
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+ pass the current selection state of the node in to the user
+ selection func
+
2001-10-06 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to
+2001-10-08 Havoc Pennington <hp@pobox.com>
+
+ * demos/gtk-demo/stock_browser.c: remove unused enum
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+ pass the current selection state of the node in to the user
+ selection func
+
2001-10-06 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to
+2001-10-08 Havoc Pennington <hp@pobox.com>
+
+ * demos/gtk-demo/stock_browser.c: remove unused enum
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+ pass the current selection state of the node in to the user
+ selection func
+
2001-10-06 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to
+2001-10-08 Havoc Pennington <hp@pobox.com>
+
+ * demos/gtk-demo/stock_browser.c: remove unused enum
+
+ * gtk/gtktreeselection.c (gtk_tree_selection_real_select_node):
+ pass the current selection state of the node in to the user
+ selection func
+
2001-10-06 Matthias Clasen <matthiasc@poet.de>
* gdk/x11/gdkx.h (GDK_CURSOR_XCURSOR): Replace reference to
GtkWidget *icon_image;
};
-/* columns in the tree model */
-enum {
- COLUMN_ICON_MACRO,
- COLUMN_LABEL,
- COLUMN_ACCEL,
- COLUMN_ID
-};
-
static gchar*
id_to_macro (const gchar *id)
{
*
* Sets the selection function. If set, this function is called before any node
* is selected or unselected, giving some control over which nodes are selected.
+ * The select function should return %TRUE if the state of the node may be toggled,
+ * and %FALSE if the state of the node should be left unchanged.
**/
void
gtk_tree_selection_set_select_function (GtkTreeSelection *selection,
path = _gtk_tree_view_find_path (selection->tree_view, tree, node);
if (selection->user_func)
{
- if ((*selection->user_func) (selection, selection->tree_view->priv->model, path, selection->user_data))
+ if ((*selection->user_func) (selection, selection->tree_view->priv->model, path,
+ GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_SELECTED),
+ selection->user_data))
selected = TRUE;
}
else
typedef gboolean (* GtkTreeSelectionFunc) (GtkTreeSelection *selection,
GtkTreeModel *model,
GtkTreePath *path,
+ gboolean path_currently_selected,
gpointer data);
typedef void (* GtkTreeSelectionForeachFunc) (GtkTreeModel *model,
GtkTreePath *path,